<?php

namespace App\Models;

/**
 * 用户申请需求/服务时--需求/服务关联表
 */
class UserObjectRelation extends BaseModel
{
    protected $table = 'user_object_relation';

    /**
     * The attributes that are mass assignable.
     *
     * @var string[]
     */
    // protected $fillable = [];

    /**
     * The attributes that should be hidden for serialization.
     *
     * @var array
     */
    protected $hidden = [];

    protected $guarded = [];
    /**
     * The attributes that should be cast.
     *
     * @var array
     */
    protected $casts = [];

    public function services()
    {
        return $this->hasOne(Service::class, "id", "object_id");
    }

    public function demands()
    {
        return $this->hasOne(Demand::class, "id", "object_id");
    }
}
